﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/Site2.Master" AutoEventWireup="true"
    CodeBehind="UserRegistration.aspx.cs" Inherits="CDOP.UserRegistration" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Table ID="tblUserInfo" runat="server">
        <asp:TableRow>
            <asp:TableCell>
                 <label for="txtFirstName">Enter First Name</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtFirstName" ID="rfvFirstName" runat="server"
                    EnableClientScript="true" ErrorMessage="First name is requied" Text="*"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
               <label for="txtLastName">Enter Last Name</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtLastName" ID="rfvLastName" runat="server"
                    EnableClientScript="true" ErrorMessage="Last name is requied" Text="*"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
               <label for="txtContactNumber">Enter a Contact Number</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtContactNumber" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtContactNumber" ID="rfvContactNumber"
                    runat="server" EnableClientScript="true" ErrorMessage="A contact number is requied"
                    Text="*"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                <label for="txtEmail">Enter your Email Address</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtEmail" ID="rfvEmail" runat="server"
                    EnableClientScript="true" ErrorMessage="Email is requied" Text="*"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="regVEmail" ControlToValidate="txtEmail" runat="server"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="Enter a correct email address"></asp:RegularExpressionValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                 <label for="txtUserName">Enter User Name</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtUserName" ID="rfvUserName" runat="server"
                    EnableClientScript="true" ErrorMessage="User name is requied" Text="*"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>


            <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label7" runat="server" Text="User Type"></asp:Label>
        </asp:TableCell>
        <asp:TableCell>
            <asp:DropDownList ID="ddUserType" runat="server" DataSourceID="ObjectDataSourceUserType"
                DataTextField="Type" DataValueField="id">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="ObjectDataSourceUserType" runat="server" SelectMethod="GetUserTypeDetails"
                TypeName="CDOP.Model.CommonRepository"></asp:ObjectDataSource>
        </asp:TableCell>
    </asp:TableRow>


        <asp:TableRow>
            <asp:TableCell>
                <label for="txtPassword">Enter Password</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox TextMode="Password" ID="txtPassword" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtPassword" ID="rfvPassword" runat="server"
                    EnableClientScript="true" ErrorMessage="Password is requied" Text="*"></asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                <label for="txtConfirmPassword">Confirm Password</label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtConfirmPassword" TextMode="Password" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ControlToValidate="txtConfirmPassword" ID="rfvConfirmPassword"
                    runat="server" EnableClientScript="true" ErrorMessage="Password Confirmation is requied"
                    Text="*"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="cmpVCOnfirmPassword" ControlToValidate="txtConfirmPassword"
                    ControlToCompare="txtPassword" runat="server" ErrorMessage="Passwords must match"></asp:CompareValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="BtnSubmitClick" />
                <asp:Button runat="server" OnClientClick="document.forms[0].reset();return false;" Text="Reset All" />
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    <asp:Label ID="lblStatus" runat="server"></asp:Label>
</asp:Content>
